﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using cms.libs;

namespace CMS
{
    public partial class ReportAccountJackpot : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            
            if (!IsPostBack)
            {
                txtFromDate.SelectedDate = DateTime.Now.AddDays(-10);
                txtToDate.SelectedDate = DateTime.Now;
                BindData();
            }
        }
        protected void BindData()
        {
            DateTime fromD = txtFromDate.SelectedDate.Value;
            DateTime toD = txtToDate.SelectedDate.Value;

            DataTable lst = new DBAccountReport().GetListAccountJackpot(fromD, toD, txtAccountId.Text, int.Parse(drpRoom.SelectedValue));

            GridView1.DataSource = lst;
            GridView1.DataBind();
        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            BindData();
        }

        protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
        {
            GridView1.PageIndex = e.NewPageIndex;
            BindData();
        }
    }
}